<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1" />
		<script type="text/javascript" src="./js/jquery-3.2.1.js"></script>
		<script type="text/javascript">.
		//DEFAULT_URL 需要在viewer.js中移除定义
		
			//方式1
			var DEFAULT_URL="/loadPdfData?fileName=pdf_test.pdf";
			//方式2
			 var PDFData = "";
			$.ajax({
				type: "post",
				async: false,
				mimeType: 'text/plain; charset=x-user-defined',
				data:{"flag":"","fileName":"111.pdf"},
				url: "/test/getFileByte.do",
				success: function(data) {
					PDFData = data;
					alert("---数据请求成功");
				},error:function(data){
					alert("error");
				}
			});
			var rawLength = PDFData.length;
			//转换成pdf.js能直接解析的Uint8Array类型,见pdf.js-4068  
			var array = new Uint8Array(new ArrayBuffer(rawLength));
			for(i = 0; i < rawLength; i++) {
				array[i] = PDFData.charCodeAt(i) & 0xff;
			}
			DEFAULT_URL = array;  
			
			
			function fun_iframeOnLoad(){
				
				
			}
		</script>
	</head>
	<body>
		<div id="box">
			
			<iframe onload="fun_iframeOnLoad()" width="100%" height="100%" src="./js/pdfShow/generic/web/viewer.html"></iframe>
		</div>
	</body>
</html>
